package com.hyperfix.washer.config;

import com.alibaba.fastjson.JSON;
import com.hyperfix.models.washer.pojos.WSData;

import javax.websocket.Encoder;
import javax.websocket.EndpointConfig;

/**
 * @author JiangChunYu
 * 2024/3/20
 */
public class ServerEncoder implements Encoder.Text<WSData> {
    @Override
    public String encode(WSData wsData) {
            return JSON.toJSONString(wsData);
    }

    @Override
    public void init(EndpointConfig endpointConfig) {

    }

    @Override
    public void destroy() {

    }
}
